using System;
using System.Linq;

namespace OrbitOne.Elmah.Data
{
    /// <summary>
    /// Represents the IElmahContext.
    /// </summary>
    public interface IElmahContext: IDisposable
    {
        #region Properties
        /// <summary>
        /// Gets the agents.
        /// </summary>
        IQueryable<Agent> Agents { get; }
        /// <summary>
        /// Gets the Elmah Errors.
        /// </summary>
        IQueryable<ELMAH_Error> ElmahErrors { get; }
        /// <summary>
        /// Gets the error filter rules.
        /// </summary>
        IQueryable<ErrorFilterRule> ErrorFilterRules { get; }
        /// <summary>
        /// Gets the Xpaths
        /// </summary>
        IQueryable<XPath> XPaths { get; }
        /*/// <summary>
        /// Get the XPath belongs to rules.
        /// </summary>
        IQueryable<XPathBelongsToRuleEntity> XPathBelongsToRules { get; }*/
        /*/// <summary>
        /// Gets the <code>ISession</code>
        /// </summary>
        ISession Session { get; } */
        #endregion

        #region Methods
        /// <summary>
        /// Gets an T by its id
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <typeparam name="S"></typeparam>
        /// <param name="id"></param>
        /// <returns></returns>
        #endregion

        void Save(object entity);
        void Save<T>(T entity, object id);
    }
}